<?php
if ($ids) {
	foreach ($ids as $id) {
?>
		<div class="block_item" id="block_item">
			<a href="<?php echo $arrLink[$id]?>" title="<?php echo $arrText[$id]?>"> 
				<img src="<?php echo $imgs[$id]?>" class="smallObject" /> </a>
				<p class="text_center">
					<a href="<?php echo $arrLink[$id]?>" title="<?php echo $arrText[$id]?>"> 
						<?php echo $arrText[$id]?> 
					</a>
				</p>
			</div>
		<?php
	}
?>
<div class="clear"></div>
<?php
	if (isset($page)) {
		echo "Trang :";
		for ($i = 0; $i < $page; $i++) {
?>
		<a href="#block_item" class="page"><?php echo $i + 1?></a>&nbsp;&nbsp;
	<?php 
		} 	
		if (count($ids) == $ubi['SITE']['N_POSTS_PER_PAGE']) {
	?>
		<a href="#block_item" class="page"><?php echo $page + 1?></a>
	<?php 
		}
	}
}
?>
<script language="javascript" type="text/javascript">
	$('a.page').bind('click', function() {
		$.viewPage($(this).html());
	});
</script>